#ifndef AUTHUSER_H
#define AUTHUSER_H

#include <QWidget>

#include <api/systemManager/rolemanagerapi.h>

namespace Ui {
class AuthUser;
}

class AuthUser : public QDialog
{
    Q_OBJECT

public:
    explicit AuthUser(QString id,QWidget *parent = nullptr);
    ~AuthUser();

private slots:
    void on_btn_close_clicked();

    void on_btn_next_clicked();

    void on_btn_pervious_clicked();

    void on_btn_cancleAuth_clicked();

    void on_comboBox_pageItem_currentIndexChanged(int index);

    void on_lineEdit_gotoPage_returnPressed();

    void on_btn_hideSearch_clicked();

    void on_btn_refresh_clicked();

    void on_btn_search_clicked();

    void on_btn_reset_clicked();

    void on_btn_addUser_clicked();

private:
    Ui::AuthUser *ui;
    QString roleId;
    RoleManagerApi roleManagerApi;
    int pageNum;
    int pageSize;
    int total;
    int totalPage;
    int currentPage;
    QList<User> userList;

    void init();
    void getList();
    void initTable();
    void initPageInfo();
};

#endif // AUTHUSER_H
